#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1.01e6, MOD = 1e9 + 7;
int n, m, a[N];
inline int qmi(int a, int k = MOD - 2, int p = MOD)
{
    int res = 1 % p;
    while (k)
    {
        if (k & 1)
        {
            res = (int)res * a % p;
        }
        a = (int)a * a % p;
        k >>= 1;
    }
    return res;
}
class lcpsTree
{
public:
    lcpsTree(const vector<int> &data)
    {
        n = data.size();
        tree.resize(2 * n * 2);
        buildlcpsTree(data, 0, 0, n - 1);
    }

private:
    vector<int> tree;
    int n;
    void buildlcpsTree(const vector<int> &data, int node, int st, int ed)
    {
        if (st == ed)
        {
            tree[node] = data[st];
        }
        else
        {
            int mid = (st + ed) / 2;
            int left = 2 * node + 1;
            int right = 2 * node + 2;
            buildlcpsTree(data, left, st, mid);
            buildlcpsTree(data, right, st, mid);
            tree[node] = tree[left] + tree[right];
        }
    }
};
int fpow(int x,int y=MOD-2)
{
    int ans=1;
    while(y)
    {
        if(y&1)
            ans = x * ans % MOD;
        x = x * x % MOD;
        y /= 2;
    }
    return ans;
}
void quick_sort(int q[], int l, int r)
{
    if (l >= r)
        return;
    int i = l - 1, j = r + 1, x = q[l + r >> 1];
    while (i < j)
    {
        do
            i++;
        while (q[i] < x);
        do
            j--;
        while (q[j] > x);
        if (i < j)
            swap(q[i], q[j]);
    }
    quick_sort(q, l, j), quick_sort(q, j + 1, r);
}
signed main()
{
    cin >> n >> m;
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];
    }
    bool f = 0;
    quick_sort(a, 1, n);
    // for(int i=1;i<=n;i++)
    // {
    //     cout << a[i] << " ";
    // }
    int ans = 0;
    for (int i = n; i >= 1; i--)
    {
        int q = m, p = min(m, a[i]);
        (ans += q * qmi(p)) %= MOD;
    }
    cout << ans;
    if (ans >= 0)
    {
        f = 1;
    }
    vector<int> data = {1, 3, 5, 7, 9, 11};
    lcpsTree lcptree(data);
    int res = 0;
    while (f)
    {
        vector<int> Cc;
        Cc = data;
        res = ans;
        break;
    }
   // cout << res;
    return 0;
}